#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

struct Fraction {
    int top;//分子numerator
    int bottom;//分母denominator
};

int gcd(int a, int b) {
    if (b == 0)return a;
    return gcd(b, a % b);
}

void simplify(Fraction &f) {
    int g = gcd(f.top, f.bottom);
    f.top /= g;
    f.bottom /= g;

}

void input(Fraction &f) {
    cin >> f.top >> f.bottom;
    simplify(f);
}

void output(Fraction f) {
    printf("%d/%d", f.top, f.bottom);
}

int main() {
    cout << gcd(3, 6) << endl;
    Fraction f = {2, 4};
    input(f);
    output(f);
    return 0;
}